From: Jasper St. Pierre Date: Sun, 17 Feb 2013 04:28:29 +0000 (-0500) Subject: messageTray: Re-add the hotcorner when the panel is updated X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4775 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b53d1df4dfa8825b2209f7825e4aa638e8662f90;p=gnome-shell.git messageTray: Re-add the hotcorner when the panel is updated The activities button may come and go at any moment now that we have a dynamic panel. We need to re-check the activities button whenever the panel is updated. https://bugzilla.gnome.org/show_bug.cgi?id=694038 --- diff --git a/js/ui/main.js b/js/ui/main.js index e493a90bb..ae0754a08 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -131,6 +131,9 @@ function start() { screenShield = new ScreenShield.ScreenShield(); else screenShield = new ScreenShield.ScreenShieldFallback(); + + // The message tray relies on being constructed + // after the panel. panel = new Panel.Panel(); messageTray = new MessageTray.MessageTray(); keyboard = new Keyboard.Keyboard(); diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 28ec5f37d..ce721361e 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1651,8 +1651,6 @@ const MessageTray = new Lang.Class({ { keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY }); this._grabHelper.addActor(this._summaryBoxPointer.actor); this._grabHelper.addActor(this.actor); - if (Main.panel.statusArea.activities) - this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor); Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged)); @@ -1707,6 +1705,8 @@ const MessageTray = new Lang.Class({ this._updateState(); })); + // Track if we've added the activities button + this._activitiesButtonAdded = false; Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); Main.wm.addKeybinding('toggle-message-tray', @@ -1802,6 +1802,11 @@ const MessageTray = new Lang.Class({ }, _sessionUpdated: function() { + if (!this._activitiesButtonAdded && Main.panel.statusArea.activities) { + this._activitiesButtonAdded = true; + this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor); + } + if ((Main.sessionMode.isLocked || Main.sessionMode.isGreeter) && this._inCtrlAltTab) { Main.ctrlAltTabManager.removeGroup(this._summary); this._inCtrlAltTab = false;